package com.sc.nft.dto.profit;

import com.sc.nft.enums.MarketLevelEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.List;


@Data
public class SaveShareProfitDTO  {

    @ApiModelProperty("id")
    private Long id;

    @ApiModelProperty("所属市场")
    @NotNull(message = "所属市场不能为空")
    private MarketLevelEnum marketLevel;

    @ApiModelProperty("模板标题")
    @NotBlank(message = "模板标题不能为空")
    private String panelName;

    @ApiModelProperty("直推分润关联藏品Id列表")
    private List<Long> collectionIds;

    @ApiModelProperty("直推占比")
    @NotNull(message = "直推占比不能为空")
    @DecimalMin(value = "0",message = "直推占比不能小于0")
    @DecimalMax(value = "1",message = "直推占比不能大于1")
    private BigDecimal directPushRatio;

    @ApiModelProperty("省级版图占比")
    @NotNull(message = "省级版图占比不能为空")
    @DecimalMin(value = "0",message = "省级版图占比不能小于0")
    @DecimalMax(value = "1",message = "省级版图占比不能大于1")
    private BigDecimal metaMapProvinceRatio;

    @ApiModelProperty("市级版图占比")
    @NotNull(message = "市级版图占比不能为空")
    @DecimalMin(value = "0",message = "市级版图占比不能小于0")
    @DecimalMax(value = "1",message = "市级版图占比不能大于1")
    private BigDecimal metaMapCityRatio;

    @ApiModelProperty("区级版图占比")
    @NotNull(message = "区级版图占比不能为空")
    @DecimalMin(value = "0",message = "区级版图占比不能小于0")
    @DecimalMax(value = "1",message = "区级版图占比不能大于1")
    private BigDecimal metaMapRegionRatio;

    @ApiModelProperty("玛特分润")
    @NotNull(message = "玛特分润信息不能为空")
    @Valid
    private MetaShareProfitDTO metaShareProfitDTO;

    @ApiModelProperty("企业分润")
    @Valid
    private List<BusinessShareProfitDTO> businessShareProfitDTOS;
}
